<?php

namespace App\Http\Controllers\Traits;

use Dingo\Api\Http\Response;
use Illuminate\Http\Request;

trait ShowResource
{
    /**
     * Resource Controller for Destrot method
     *
     * @return false|string
     */
    public function show()
    {
        $data      = [];

        if ($model = $this->getResourceFromRoute()) {
            $data  = $model->toArray();
        }

        return $this->success($data);

    }
}
